import { IS_MODAL } from './bindResult';

export type TApiFun<TData, TParams extends Array<any>> = (
  ...params: TParams
) => Promise<TData>;

export type FOnSuccess = (...args: any[]) => void;

export type IModalBinder = {
  showModal: (...args: any[]) => Promise<any>;
  registerSuccess: (f: FOnSuccess) => void;
  unregisterSuccess: (f: FOnSuccess) => void;
  [IS_MODAL]: true;
};
